﻿using PMS.Core.Configuration.CommonEnumConfigs;
using PMS.Data.Entities.Security;
using PMS.Data.Entities.Stores;

namespace PMS.Data.Entities.NaviMenus
{
    /// <summary>
    /// Represents a NaviMenu record
    /// </summary>
    public partial class NaviMenu : BaseEntity, IStoreMappingSupported, IAclSupported
    {
        /// <summary>
        /// Gets or sets the LanguageCode related to LanguageEntity
        /// 归属语言(关联sys_languages.LanguageCode)标识
        /// </summary>
        public string LanguageCode { get; set; }

        /// <summary>
        /// Gets or sets the ParentId
        /// 父级菜单ID，无父级菜单(即顶级)时为0
        /// </summary>
        public int ParentId { get; set; }

        /// <summary>
        /// Gets or sets the MenuGroupId related to NaviMenuGroup
        /// 菜单栏目功能分组ID
        /// </summary>
        public int MenuGroupId { get; set; }

        /// <summary>
        /// 当栏目菜单为商品时标识分组商品的价格搜索区间
        /// </summary>
        public string PriceRange { get; set; }

        /// <summary>
        /// 栏目菜单层级深度在多层菜单(父子结构)中标识菜单深度
        /// </summary>
        public int MenuDepth { get; set; }

        /// <summary>
        /// Gets or sets the displayname of the navimenu
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// Gets or sets the Subtitle(SubHead) of the navimenu
        /// </summary>
        public string SubTitle { get; set; }

        /// <summary>
        /// Gets or set the ExtendDescription for navimenu backup
        /// 标题备用扩展描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// Gets or set the MetaTile for seo
        /// </summary>
        public string MetaTitle { get; set; }

        /// <summary>
        /// Gets or sets the MetaKeywords for seo
        /// </summary>
        public string MetaKeywords { get; set; }

        public string MetaDescription { get; set; }
        /// <summary>
        /// Gets or set a value to indicate whether to display the navimenu 
        /// on front page
        /// </summary>
        public bool ShowOnHomepage { get; set; }

        /// <summary>
        /// Gets or set a value to store the LayoutTemplateType
        /// </summary>
        public LayoutTemplateType LayoutTemplateType { get; set; }

        /// <summary>
        /// Gets or sets the PageSize of the ListPage Data when navimenu display as a ListPage
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// see NaviMenuLayoutTemplate.PageSizeOptions
        /// </summary>
        public string PageSizeOptions { get; set; }

        /// <summary>
        /// 伪链接地址用于url地址的美化和功能导航可选地址美化或不美化，
        /// 通过地址转化可找到对应的controller进行页面数据展示
        /// </summary>
        public string UrlRoute { get; set; }

        /// <summary>
        /// 是否对导航地址美化
        /// 是 则通过导航菜单层级将导航菜单逐级翻译并通过'/'进行连接 如 /aboutus/contact
        /// 否 则通过栏目菜单所展示方式生成对应的URL 如菜单为文章列表展示 则为/articlelist?id=xxx
        /// </summary>
        public bool BeautifyUrlRoute { get; set; }
         
        public LinkOpenMode UrlTarget { get; set; }

        /// <summary>
        /// 关联媒体库对应上传图标图片ID，方便后台更换指定图片数据
        /// </summary>
        public int IconImageId { get; set; }

        /// <summary>
        /// 图片表对应图标ID的图片
        /// 显示URL也可不关联，即IconImageId为0，则为其他可访问的图片地址链接
        /// 在前端展示时方便通过URL直接展示图片而不用再通过IconImageId查询
        /// </summary>
        public string IconImageUrl { get; set; }

        /// <summary>
        /// 关联媒体库对应上传栏目封面图片ID， 方便后台更换指定图片数据
        /// </summary>
        public int CoverImageId { get; set; }

        /// <summary>
        /// 图片表对应封面ID的图片
        /// 显示URL。也可不关联，即CoverImageId为0，则为其他可访问的图片地址链接
        /// 在前端展示时方便通过URL直接展示图片而不用再通过CoverImageId查询
        /// </summary>
        public string CoverImageUrl { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the entity is limited/restricted to certain stores
        /// </summary>
        public bool LimitedToStores { get; set; }

        public bool SubjectToAcl { get; set; }
        public int DisplayOrder { get; set; }
        //Set IsActive Mapped On BaseEntity
        //public bool IsActive { get; set; }
        //public DateTime CreatedOnTimeUtc { get; set; }
        //Set UpdatedOnTimeUtc NotMapped
        //public DateTime UpdatedOnTimeUtc { get; set; }
    }
}
